FROM ubuntu
MAINTAINER fengzhihao 1209103220@qq.com

RUN apt-get update

RUN apt-get install wget -y

RUN apt-get install build-essential libtool -y

RUN apt-get install libpcre3 libpcre3-dev -y

RUN apt-get install zlib1g-dev -y

RUN apt-get install openssl -y

RUN mkdir /usr/nginx

WORKDIR /usr/nginx

RUN wget http://nginx.org/download/nginx-1.15.12.tar.gz

RUN tar xvzf nginx-1.15.12.tar.gz

WORKDIR /usr/nginx/nginx-1.15.12

RUN ./configure --prefix=/usr --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx/nginx.pid --lock-path=/var/lock/nginx.lock --with-stream

RUN make

RUN make install

CMD ["nginx", "-g", "daemon off;"]



